package com.link.base.base.consumer.service;

import com.link.base.base.consumer.dao.mybatis.mapper.PortalAccntTagItemMapper;
import com.link.base.base.consumer.model.PortalAccntTagItem;
import com.link.core.basic.dao.mapper.BasicMapper;
import com.link.core.basic.service.BasicServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 消费者标签(行操作）
 * @author  yipeng.zhu@hand-china.com
 * @date:   2018/11/5 16:30
 * @version 1.0
 */

@Service
public class PortalAccntTagItemServiceImpl extends BasicServiceImpl<PortalAccntTagItem>
        implements PortalAccntTagItemService {
    @Resource
    private PortalAccntTagItemMapper portalAccntTagItemMapper;

    @Override
    public BasicMapper<PortalAccntTagItem> getBasicMapper() throws Exception {
        return portalAccntTagItemMapper;
    }

    /**
     * 生效
     */

    @Override
    public void itemTagApproveUpdate(PortalAccntTagItem record) throws Exception {
        record.setValidFlag("Y");
        portalAccntTagItemMapper.itemTagApproveUpdate(record);
    }

    /**
     * 失效
     */

    @Override
    public void itemTagRejectUpdate(PortalAccntTagItem record) throws Exception {

        record.setValidFlag("N");
        portalAccntTagItemMapper.itemTagRejectUpdate(record);
    }
}
